<?php
require_once('Elements.php');

/**
 * Edit contact form.
 * 
 * @author james
 *
 */
class EditContactForm extends Zend_Form {
	
	private $userRelation;
	
	public function EditContactForm($userRelation) {
		$this->userRelation = $userRelation;
		$this->__construct();
	}
	
	public function init() {
		$elements = new Elements();
		
		$element = $elements->getContactAliasTextField($this->userRelation);
		$this->addElement($element);
		
		$element = new Zend_Form_Element_Hidden('original_user_id');
		$element->setValue($this->userRelation->original_user_id);
		$this->addElement($element);
		
		$element = new Zend_Form_Element_Hidden('potential_user_id');
		$element->setValue($this->userRelation->potential_user_id);
		$this->addElement($element);
		
		$submit = $this->createElement('submit', 'submit');
		$submit->setName('Save');
		$submit->removeDecorator('DtDdWrapper');	//Remove unneccesary dt label	
		$this->addElement($submit);
	}
}
?>